package com.tdkj.model.bbs;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * EjfFriendId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class EjfFriendId implements java.io.Serializable {

	// Fields

	private String userId;
	private String friendId;

	// Constructors

	/** default constructor */
	public EjfFriendId() {
	}

	/** full constructor */
	public EjfFriendId(String userId, String friendId) {
		this.userId = userId;
		this.friendId = friendId;
	}

	// Property accessors

	@Column(name = "userID", nullable = false, length = 15)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "friendID", nullable = false, length = 15)
	public String getFriendId() {
		return this.friendId;
	}

	public void setFriendId(String friendId) {
		this.friendId = friendId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EjfFriendId))
			return false;
		EjfFriendId castOther = (EjfFriendId) other;

		return ((this.getUserId() == castOther.getUserId()) || (this.getUserId() != null && castOther.getUserId() != null && this.getUserId().equals(castOther.getUserId())))
				&& ((this.getFriendId() == castOther.getFriendId()) || (this.getFriendId() != null && castOther.getFriendId() != null && this.getFriendId().equals(castOther.getFriendId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getUserId() == null ? 0 : this.getUserId().hashCode());
		result = 37 * result + (getFriendId() == null ? 0 : this.getFriendId().hashCode());
		return result;
	}

}